<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            height: 400px;
            width: 400px;
            border: 1px solid #000;
            /* 渐变是从图片上面实现的 */
            /* 0% pink~100% blue */
            /* background-image: linear-gradient(0deg,blue,pink); */
            background-image: linear-gradient(0deg,blue 50%,pink 50%);
        }
    </style>
</head>
<body>
    <div class="box"></div>
</body>
</html>